package com.hqyj.emb.system.service.Impl;

import com.hqyj.emb.system.dao.Impl.PermissionDaoImpl;
import com.hqyj.emb.system.dao.PermissionDao;
import com.hqyj.emb.system.model.Permission;
import com.hqyj.emb.system.service.PermissionService;

import java.util.List;

public class PermissionServiceImpl implements PermissionService {
    PermissionDao permissionDao=new PermissionDaoImpl();
    @Override
    public List<Permission> queryAllRolePermission() {
        return permissionDao.queryAllRolePermission();
    }

    @Override
    public int updateRolePermission(Permission permission) {
        return permissionDao.updateRolePermission(permission);
    }

    @Override
    public int deleteRolePermission(int permissionId) {
        return permissionDao.deleteRolePermission(permissionId);
    }

    @Override
    public Permission queryRolePermission(int permissionId) {
        return permissionDao.queryRolePermission(permissionId);
    }

    @Override
    public int updatePermission(Permission permission) {
        return permissionDao.updatePermission(permission);
    }

    @Override
    public List<Permission> queryRolePermissionByRoleId(int roleId) {
        return permissionDao.queryRolePermissionByRoleId(roleId);
    }

    @Override
    public List<Permission> queryUserRoleByUserId(int userId) {
        return permissionDao.queryUserRoleByUserId(userId);
    }

    @Override
    public List<Permission> queryPermissionByPid(int pId) {
        return permissionDao.queryPermissionByPid(pId);
    }
}
